partes :: [a] -> [[a]]
partes l = foldr (\x rec -> rec ++ concatenarATodas [x] rec) [[]] l
      
concatenarATodas :: [a] -> [[a]] -> [[a]]
concatenarATodas lConcat lBase = map (++lConcat) lBase

prefijos :: [a] -> [[a]]
prefijos l = foldl (\rec x -> rec ++ [last rec ++ [x]]) [[]] l

sublistas :: [a] -> [[a]]
sublistas l = aplanar (foldl (\rec x -> rec ++ [concatenarATodas [x] (last rec)]) [[[]]] l)

aplanar :: [[a]] -> [a]
aplanar = foldr (++) []